from aiy.board import Board, Led
import time

class AiyMission:
    def __init__(self):
        with Board() as board:
            self._board = board
            self.do = self._do
            self.stop = self._stop
            for i in range(5):
                board.led.state = Led.ON
                time.sleep(0.1)
                board.led.state = Led.OFF
                time.sleep(0.1)

    def _do(self):
        self._board.led.state = Led.ON

    def _stop(self):
        self._board.led.state = Led.OFF